package com.example.projectmanagement.repository.study;

import com.example.projectmanagement.model.study.Achievement;
import com.example.projectmanagement.model.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;

@Repository
public interface AchievementRepository extends JpaRepository<Achievement, Long> {
    List<Achievement> findByUser(User user);
    Page<Achievement> findByUser(User user, Pageable pageable);
    List<Achievement> findByUserAndAchievementType(User user, String achievementType);
}